import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import ElementPlus from "element-plus";
import Mycom from "@/components/mycom.vue";
import "element-plus/dist/index.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import mitt from "mitt";
import "./reset.css";
import store from "./store";
const bus = mitt();

const app = createApp(App);

const page = app
  .use(ElementPlus, {
    locale: zhCn,
  })
  .component("Mycom", Mycom)
  .use(store)
  .use(router)

  .mount(document.createElement("div"));
app.config.globalProperties.$bus = bus;
app.config.warnHandler = (msg, instance, trace) => {
  // `trace` 是组件层级结构的追踪
};
document.body.appendChild(page.$el);
